package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.device.csun.sleep.entity.CsunSleepData;
import com.csun.cmny.provider.model.domain.DmcCsunSleepData;
import com.csun.cmny.provider.model.vo.CsunSleepDataReqVo;
import com.csun.cmny.provider.model.vo.DmcDeviceAlert;
import com.csun.cmny.provider.vo.DmcCsunSleepDataVo;
import com.csun.cmny.provider.model.vo.csunsleep.DmcCsunSleepVo;
import com.csun.cmny.provider.vo.RoomSleepInfo;
import com.csun.cmny.provider.vo.SleepDataVo;
import com.csun.cmny.provider.model.vo.life.LifeSleepDataIndex;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface DmcCsunSleepDataMapper extends Mapper<DmcCsunSleepData> {

    /**
     * 查询所有绑定了的日创床垫数据
     *
     * @return
     */
    List<CsunSleepData> queryCsunSleepDataBindList();

   List <LifeSleepDataIndex> selectDataByRoomId(Long roomId);
    //查询床垫数据
    List<LifeSleepDataIndex> querySleepInfoByRoomId(@Param("ids") ArrayList<Long> ids);
    //查询报警信息
    List<DmcDeviceAlert> querySleepAlertInfo(@Param("ids") ArrayList<Long> ids,@Param("isHandle") Integer isHandle);
    //查询床垫状态
    List<SleepDataVo> queryInBed(@Param("deviceIds") List<Long> deviceIds);
    //查询绑定了床垫的老人
    List<RoomSleepInfo> querySleepBind(@Param("ids") ArrayList<Long> ids);
    //查询床垫时间段是否在床
    List<CsunSleepDataReqVo> querySleepInbed(@Param("ids") ArrayList<Long> ids,@Param("time") String time);
    //查询报警信息
    List<DmcDeviceAlert> queryAllSleepAlert(@Param("ids") ArrayList<Long> ids);
    //查询床垫状态
    List<DmcCsunSleepDataVo> querySleepDateById(@Param("dmcCsunSleepVos") List<DmcCsunSleepVo> dmcCsunSleepVos);
}